package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"go-zero-example/cmd/userapi/internal/config"
	"go-zero-example/cmd/userrpc/userservice"
)

type ServiceContext struct {
	Config config.Config

	UserRpc userservice.UserService
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config: c,

		UserRpc: userservice.NewUserService(zrpc.MustNewClient(c.UserRpcConf)),
	}
}
